Ideal Gas Law
-------------

In Thermodynamics, the Ideal Gas Law is a remarkably accurate description of
how gasses behave. Although it doesn't apply in all cases, specifically, then
the density of the gas is close to the density of its liquid form, or near its
boiling point, it is generally useful elsewhere.

The Ideal Gas Law can be used along with a primitive and simple understanding
of the atomic nature of matter to derive remarkably accurate intuition in how
real matter behaves outside of thermodynamics. This provides a good
springboard to get into Statistical Mechanics.

Volume
======

Gasses are noted for their tendency to expand to fill any volume. Measuring
volumes can be accomplished by using a ruler and multiplying the three
dimensions. More easily, you can use a liquid to measure the volume of a
chamber (although the Ideal Gas Law obviously doesn't apply to liquids.)

Typically, in experiments involving the Ideal Gas Law, the volume is either
fixed or modified by means of a piston. The piston is set in a cylinder and
changing the position of the piston will modify the volume of the gas by the
cross-section of the cylinder times the displacement of the piston.

Pressure
========

Pressure is a force per unit area. Pressure is measured by means of a piston.
Finding the force necessary to hold the volume constant, times the area of the
cross-section of the cylinder will give you the pressure.

Typically, a liquid, such as mercury, is used as a piston. The pressure of the
gas will push on the mercury. If the other end of the mercury is in a sealed
tube held upright, then a near-vacuum will be created. The height difference
between the mercury on two ends of the U-bend will tell you how much pressure
the gas is exerting on the mercury. Just multiply the density of mercury by
:math:`g`, the gravitational constant near earth's surface, and you will know
to a high degree of precision how much pressure the gas is exerting.

If, instead of a vacuum, there is some other gas on the other end (such as the
atmosphere) then the difference in height will only give you the difference in
pressure. This is less than ideal because it is difficult to know the pressure
of the atmosphere at any given moment, and it can vary by quite a lot
throughout the day.

Temperature
===========

Temperature is not trivial to measure, and even modern temperature measuring
devices are not completely accurate or precise. By "accurate" I mean it gives
a consistent reading compared to other thermometers. IE, one type of
thermometer will give you a different temperature than another type. By
"precise" I mean how many significant figures you can measure with the
thermometer.

There are two types of thermometers that should be especially interesting for
experiments involving gasses near Ideal Gas conditions. One is the mercury
thermometer -- as mercury warms up, it expands, and you can accurately measure
the minute changes in temperature. Another is the gas thermometer, which
changes its volume linearly according to temperature (assuming it is well
beyond its boiling point.)

Other devices exist and give quicker readings with less effort and are
commonly used in the lab.

Number of Particles
===================

In the Ideal Gas equation, you can either count the number of moles or the
absolute number of particles. Counting moles is much easier when dealing with
chemistry and real life experiments. Counting the number of particles is more
useful when translating the Ideal Gas Law into statistical mechanics.

Gasses of the same volume, pressure, and temperature, when well beyond their
boiling point, have the same number of particles. This fact was one of the
earliest observations in chemistry, and one of the techniques chemists used to
count the number of particles in their reactions. IE, 2 volumes of hydrogen and
1 volume of oxygen will give you 1 volume of water (at sufficiently high
temperatures and at atmospheric pressure.)

In order to measure the number of moles in a gas without the Ideal Gas Law,
you can measure the weight of the gas. Combined with knowledge of the chemical
composition of the particles of the gas, it is a simple algebra equation to
solve for the number of moles in that mass.

Units
=====

Chemists have their own units that they like to use because of prevailing
conditions in their laboratories. Physicists like to use a different set of
units because it equates to the mechanics we all know and love.

- Pressure: 1 atmosphere (atm) = 1.013 x 10^5 Pascals (Pa). (1 Pa = 1 N/m^2)
- Volume: 1 liter (l) = 1x10^-3 m^3.
- Work: 1 calorie (cal) = 4.186 Joule (J). (1 cal raises 1 gram of water 1 K.
  1 J = 1 N m). 1 eV = 1.602x10^-19 J

The Equation
============

The equation comes in two forms:

- PV = nRT
- PV = NkT

- P is the pressure
- V is the volume
- n is the number of moles
- N is the number of particles
- T is the temperature
- R is 8.315 J/mol*K
- k is 1.381 x 10^-23 J/K or 8.617 x 10^-5 eV/K

Internal Energy
===============

The First Law says that energy is neither created or destroyed. The total
energy inside of a system such as an Ideal Gas must be constant, unless energy
is added or removed.

We use :math:`U` to represent the internal energy of a system. Typically, we
aren't interested in the total internal energy (since we must arbitrarily set
the baseline of energy to whatever we want.) We are thus usually interested in
:math:`\Delta U`, the change in internal energy due to circumstances.

The energy that is added or removed can take two forms: WORK and HEAT.

- HEAT is due to a difference in temperatures. It cannot be turned off except
  by the two systems coming into thermal equilibrium. It can only be slowed by
  means of insulation. We use :math:`Q` to represent the heat *added* to a
  system.
- WORK is due to changes in pressure and volume, or other means, such as
  microwaves. It is NOT due to a difference in temperature, and typically can
  be turned on and off. We use :math:`W` to represent the work *added* to a
  system. (Many textbooks use :math:`W` to represent the work *done* or *lost*
  by a system.)

.. math::

  \Delta U = Q + W

Heat Capacity
=============

A critical question we often have about things is how much the temperature

Statistical Mechanics
=====================

Using a simple model of statistical mechanics, we can derive the Ideal Gas Law
and some of the physical constants surrounding different types of gasses
based on their atomic properties.